package com.example.jdbcdemo.controller;

import com.example.jdbcdemo.mapper.GroupIdMapMapper;
import com.example.jdbcdemo.pojo.GroupIdMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;
import java.util.List;

@RestController
public class GroupIdMapController {

    @Autowired
    GroupIdMapMapper groupIdMapMapper;

    @GetMapping("/querygroupidmaplist")
    public List<GroupIdMap> querygroupidmaplist(){
        return groupIdMapMapper.queryGroupIdMapByDate("2019-1-1");
    }
    //随便测测
    @GetMapping("/queryaddgroupIdMap")
    public String addGroupIdMap(){
        groupIdMapMapper.addGroupIdMap(new GroupIdMap(4,3,new Date(),1,4));
        return "addok";
    }
}
